package com.paper.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.question.entity.Blank;
import com.question.entity.Explanation;
import com.question.entity.Judgment;
import com.question.entity.Multiple;
import com.question.entity.Single;

@Entity
@Table(name="t_subtopics")
public class Subtopics {//子题/小题
	private Long id;
	private Integer _index;
	private Single single;
	private Blank blank;
	private Multiple multiple;
	private Judgment judgment;
	private Explanation explanation;
	private float score;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}

	public Integer get_index() {
		return _index;
	}
	@ManyToOne(cascade=CascadeType.MERGE,fetch=FetchType.EAGER)
	public Single getSingle() {
		return single;
	}
	@ManyToOne(cascade=CascadeType.MERGE,fetch=FetchType.EAGER)
	public Multiple getMultiple() {
		return multiple;
	}
	@ManyToOne(cascade=CascadeType.MERGE,fetch=FetchType.EAGER)
	public Judgment getJudgment() {
		return judgment;
	}
	@ManyToOne(cascade=CascadeType.MERGE,fetch=FetchType.EAGER)
	public Explanation getExplanation() {
		return explanation;
	}

	public float getScore() {
		return score;
	}
	@ManyToOne(cascade=CascadeType.MERGE,fetch=FetchType.EAGER)
	public Blank getBlank() {
		return blank;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void set_index(Integer _index) {
		this._index = _index;
	}

	public void setSingle(Single single) {
		this.single = single;
	}

	public void setMultiple(Multiple multiple) {
		this.multiple = multiple;
	}

	public void setJudgment(Judgment judgment) {
		this.judgment = judgment;
	}

	public void setExplanation(Explanation explanation) {
		this.explanation = explanation;
	}

	public void setScore(float score) {
		this.score = score;
	}

	public void setBlank(Blank blank) {
		this.blank = blank;
	}

	
}
